package com.xxw.yygh.hosp.controller.admin;

import com.xxw.yygh.common.result.R;
import com.xxw.yygh.hosp.service.DepartmentService;
import com.xxw.yygh.vo.hosp.DepartmentVo;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/admin/hosp/department")
public class DepartmentController {

    @Resource
    private DepartmentService departmentService;

    @RequestMapping("/{hoscode}")
    public R getDepartmentList(@PathVariable String hoscode){
        List<DepartmentVo> list=departmentService.getDepartmentList(hoscode);
        return R.ok().data("list",list);
    }

}
